package com.zh.springcloud.feign;

import com.zh.springcloud.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Description:
 * @ClassName PaymentService
 * @date: 2021.06.18 11:08
 * @Author: zhanghang
 */
@Component
// 想要调用提供方的接口，必须加@FeignClient注解，value的值就是提供方服务的服务名称
@FeignClient(value = "cloud-payment-hystrix-service")
public interface PaymentService {

	@GetMapping("/payment/hystrix/ok/{id}")
	String paymentinfo_ok(@PathVariable("id") Integer id);

	@GetMapping("/payment/hystrix/timeout/{id}")
	String paymentinfo_timeout(@PathVariable("id") Integer id);
}
